﻿<%@ Control Language="C#"  Inherits="System.Web.Mvc.ViewUserControl<HuynhQuangWebsite.Models.HomeListViewModel>" %>
<%@ Import Namespace="THS.HtmlHelpers" %>

<section id="subheader">
		<div class="inner">
			<div class="subtitle">
				<h1>Tin tức - Sự kiện</h1>
			</div>
            <div class="subdesc">
			<p>Những tin tức và sự kiện chính của công ty và những thông tin liên quan trong ngành xây dụng dân dụng.</p>
		</div>
		</div>
	</section>
	<!-- #subheader -->
			
	<section class="pagemid">
		<div class="inner">
			
			<div id="main">
				<div class="entry-content">
     <%if (Model != null)
     {
         if (Model.NewsFocusList != null)
         {
             foreach (var item in Model.NewsFocusList)
             {
                  %>
					<div class="post">
								
							<h2 class="entry-title"><%=Html.FriendlyTextUrl(item.NewsTitle, "Chi_tiet", "Tin_tuc", new RouteValueDictionary { { "id", item.NewsID }, { "title", Url.EncodeFriendlyUrl(item.NewsTitle) } })%></h2>
									
							<div class="post-info">
								<div class="postmeta">
									<span><em>Ngày</em><%=item.AACreateDate.ToString("dd/MM/yyyy")%></span>
									<span><em>Trong</em> <a title="" href="#">Tin tức-sự kiện</a></span>
									<span><em>By</em> <a href="#">hoang.nguyen</a></span>
									<span><a href="#">Leave a comment</a></span>
								</div>
							</div>
							<!-- .post-info -->
								
							<div class="postimg">
								<div class="post_thumb">
                                <%=Html.FriendlyImageUrl(item.NewImgThumb,"Chi_tiet", "Tin_tuc", new RouteValueDictionary { { "id", item.NewsID }, { "title", Url.EncodeFriendlyUrl(item.NewsTitle) } })%>
									<img alt="img" src="../../Images/slider_img1.jpg" />
								</div>
							</div>
							<!-- .postimg -->
							<%if (item.NewsContent.Length > 500)
                             { %>		
							    <p><%=item.NewsContent.Substring(0, 500) + " ..."%></p>
                                <%=Html.FriendlyTextUrl("Đọc thêm...", "Chi_tiet", "Tin_tuc", new RouteValueDictionary { { "id", item.NewsID }, { "title", Url.EncodeFriendlyUrl(item.NewsTitle) } }, new Dictionary<string,string>(){{ "class","more-link" }})%>
                            <%}
                             else
                             { %>
                                 <%=item.NewsContent%>
                            <%} %>
					</div>
					<!-- .post -->
							
					<div class="divider_line"></div>
					<%}%>
     
					<div class="clear"></div>
					<div class="divider_line"></div>
					<div class="pagination wp-pagenavi">
						<span class="pages extend">Page 1  of  2</span>
						<span class="current">1</span>
						<a href="#" class="inactive" >2</a>
                            <%=Ajax.Pager(Model.NewsInfo.CurrentPage, Model.NewsInfo.TotalItems, "NewsList", 0, Model.NewsInfo.ItemsPerPage, "Paging")%>
					</div>			
                    <%    }
     } %>		
					<!-- .pagination -->
						
					
				</div>
				<!-- .entry-content -->
			</div>
			<!-- #main -->
						
			<div id="sidebar">
				<div class="widget-area">

					<aside class="syswidget">
						<h3>Tin liên qua</h3>
						<img src="../../Images/image1.jpg" alt="img" class="imageshadow bottom20" />
						<p>Vestibulum dapibus lacus a elit facilisis posuere. Maecenas eu justo id arcu pharetra pulvinar. Praesent elementum accumsan nibh, a varius elit pretium id. Etiam sagittis, risus [...]</p>
					</aside>
					<!-- .syswidget -->

					<aside class="syswidget">
						<h3 class="widget-title">Categories <span></span></h3>
						<ul>
							<li><a href="#">Blog Magaezine</a></li>
							<li><a href="#">Portfolio</a></li>
							<li><a href="#">web Design</a></li>
							<li><a href="#">Print Media</a></li>
							<li><a href="#">Donec egestas</a></li>								
							<li><a href="#">Quisque</a></li>								
						</ul>
					</aside>
					<!-- .syswidget -->
						
				</div>
				<!-- .widget-area -->
			</div>
			<!-- #sidebar -->
			
		</div>
		<!-- .inner -->
	</section>
	<!-- .pagemid -->